<template>
  <div>
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item>1</van-swipe-item>
        <van-swipe-item>2</van-swipe-item>
        <van-swipe-item>3</van-swipe-item>
        <van-swipe-item>4</van-swipe-item>
        </van-swipe>
        <ul>
            <li v-for="(item,index) in list" :key="index">{{item.name}}</li>
        </ul>
  </div>
</template>

<script>
import axios from "axios";
export default {
    data () {
        return {
            list:false
        }
    },
  created(){
    axios.get("/list").then(res=>{
        if(res.data.code===200){
            this.list=res.data.data;
        }
    })
  }
}
</script>
<style lang="scss" scoped>
.my-swipe .van-swipe-item {

  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
}
ul{
    width: 100%;
  height: auto;
  display: flex;
  flex-wrap: wrap;
  li{
      width: 25%;
      height: 60px;
  }
}
</style>